<?php
	include_once '../config.inc.php';
	if($adminId <= 0){
		echo '<script type="text/javascript">location.href = \'login.php\';</script>';
		die(0);
	}
	$stmt = $pdo->prepare('select cid,cname from kp_goods_class where state=1 order by cid asc');
	$stmt->execute();
	$gcArr = $stmt->fetchAll(PDO::FETCH_ASSOC);
	//print_r($gcArr);
	
	
	
?>
<!DOCTYPE html>
<html lang="zh">
<head>
	<meta charset="UTF-8" />
	<meta name="viewport" content="width=device-width, initial-scale=1.0" />
	<meta http-equiv="X-UA-Compatible" content="ie=edge" />
	<title>增加商品页</title>
	<script src="../js/jquery-3.1.1.js" type="text/javascript" charset="utf-8"></script>
	<script src="js/addgood.js" type="text/javascript" charset="utf-8"></script>
	<link rel="stylesheet" type="text/css" href="css/addgood.css"/>

</head>
<body>
	<div id="addgood">
		<div class="title">
			后台管理->增加商品
		</div>
		<form id="formgadd" name="spadd" action="#" method="post">
			<input type="hidden" name="eve" id="eve" value="4" />
			<ul class="left">
				<li>商品货号:</li>
				<li class="gname">商品名称:</li>
				<li class="gphoto">商品图片:</li>
				<li>商品分类:</li>
				<li>商品进价:</li>
				<li>商品售价:</li>
				<li>商品折扣价:</li>
				<li>库存数量:</li>
				<li>商品说明:</li>
			</ul>
			<ul class="right">
				<li><input type="text" name="isbn" id="isbn" value="" /></li>
				<li class="gname"><textarea name="gname"id="gname" rows="2" cols="20"></textarea></li>
				<li class="gphoto">
					<!--<input type="text" name="gphpto" id="gphpto" value="" />-->
					<textarea name="gphoto" id="gphoto" rows="3" cols="20"></textarea>
					<input type="file" multiple="multiple" id="inputfile"/>
					<div><span class="loading"></span></div>
				</li>
				<li>
					<select name="gclass">
						<?php  
							foreach($gcArr as $gclass){
								echo "<option value=\"{$gclass['cid']}\">{$gclass['cname']}</option>";
							}
						?>
					</select>
					
				</li>
				<li><input type="text" name="inprice" id="inprice" value="" /></li>
				<li><input type="text" name="price" id="price" value="" /></li>
				<li><input type="text" name="zkprice" id="zkprice" value="" /></li>
				<li><input type="text" name="num" id="num" value="" /></li>
				<li class="bz"><textarea name="bz" rows="3" cols="20"></textarea></li>
				<li><input type="button" id="submit" value="提交"/></li>
			</ul>
			<ul class="bottom"></ul>
			
		</form>
			<div id="feedback"></div>    <!-- 响应返回数据容器 --> 
	</div>	
</body>
</html>